package com.atguigu.spzx.manager.controller;

import com.atguigu.spzx.manager.service.SysRoleUserService;
import com.atguigu.spzx.model.dto.system.AssignRoleDto;
import com.atguigu.spzx.model.vo.common.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/system/sysRoleUser")
@Tag(name = "分配用户角色接口")
public class SysRoleUserController {
    @Autowired
    private SysRoleUserService sysRoleUserService;

    @PostMapping("/doAssign")
    @Operation(summary = "分配用户角色")
    public Result doAssign(@RequestBody AssignRoleDto assignRoleDto){
        sysRoleUserService.doAssign(assignRoleDto);
        return Result.OK(null);
    }
}
